#!/usr/bin/env python
# encoding: utf-8
import redis
import sys
import os

sys.path.append(os.getcwd())
from followUserSpider.settings import REDIS_HOST, REDIS_PORT,REDIS_DB,INIT_QUEUE,EXECUTE_QUEUE

r = redis.Redis(host=REDIS_HOST, port=REDIS_PORT,db=REDIS_DB)

# r.lpush(redis_key, "1670071920")

while True:
    data = r.spop(EXECUTE_QUEUE)
    if data is None:
        break
    else:
        r.lpush(INIT_QUEUE, data)

print('redis初始化完毕')